#include "demo.h"
#include "general_timer.h"

static etimer_t etimer1;
static etimer_t etimer2;
static etimer_t etimer3;

void demo_task(void *pdata)
{
	etimer_init();

	etimer_add(&etimer1, 1000, 1);
	etimer_add(&etimer2, 2000, 1);
	etimer_add(&etimer3, 3000, 1);
	while(1)
	{
		if(etimer_check(&etimer1))
			printf("etimer1 timeout!\r\n");
		if(etimer_check(&etimer2))
			printf("etimer2 timeout!\r\n");
		if(etimer_check(&etimer3))
			printf("etimer3 timeout!\r\n");
		OSTimeDlyHMSM(0, 0, 1, 0);
	}
}